package com.homedo.odin.solution.dao;

import com.homedo.core.common.base.dao.BaseDao;
import com.homedo.odin.solution.model.entity.Specification;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * <p> 行业规范 Mapper 接口 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
public interface SpecificationMapper extends BaseDao<Specification> {

    List<Specification> querySpecificationListForPri(@Param("specificationName") String specificationName,
            @Param("firstClassify") Integer firstClassify, @Param("secondClassify") Integer secondClassify,
            @Param("specificationStatus") Integer specificationStatus, @Param("formType") Integer formType,
            @Param("status") Integer status);

    Specification getSpecification(@Param("specificationId") Long specificationId);

    void auditSpecification(@Param("specificationId") Long specificationId, @Param("status") Integer status,
            @Param("auditOpinion") String auditOpinion);

    void updateDel(@Param("specificationId") Long specificationId, @Param("isDel") Integer isDel);

    List<Specification> querySpecificationListByClassify(@Param("secondClassify") Integer secondClassify);

    List<Specification> queryMySpecificationListForPc(@Param("userId") Integer userId,
            @Param("firstClassify") Integer firstClassify, @Param("secondClassify") Integer secondClassify,
            @Param("zone") String zone, @Param("createTimeSort") Integer createTimeSort);

    List<Specification> querySpecificationListForPc(@Param("userId") Integer userId,
            @Param("firstClassify") Integer firstClassify, @Param("secondClassify") Integer secondClassify,
            @Param("zone") String zone, @Param("createTimeSort") Integer createTimeSort,
            @Param("keyword") String keyword);

    List<Specification> queryRecommendSpecificationList(@Param("specificationId") Long specificationId,
            @Param("secondClassify") Integer secondClassify);

    List<Specification> queryTheFirstTenSpecification(@Param("specificationId") Long specificationId,
            @Param("secondClassify") Integer secondClassify, @Param("number") Integer number);

    void addSpecificationPageView(@Param("specificationId") Long specificationId);

    void addSpecificationDownload(@Param("specificationId") Long specificationId);

    /****************************liyiStart*/
    List<Specification> querySpecificationListFormSelect(@Param("keyword")String keyword, @Param("userId")Integer userId);
    /****************************liyiEnd*/
}